docs(data-modeling): document the managedBy lifecycle bucket and ADR-0103 write policy#3333
Merged
Merged
Conversation
…0103 write policy The Object reference never documented `managedBy` at all. Add a `managedBy` + `userActions` row to the object property table and a "Lifecycle bucket" subsection covering the five buckets, the engine-owned vs admin/user-writable `system` split (ADR-0103), the resolved-affordance write policy, the `assertEngineOwnedWriteAllowed` guard, and the apiMethods reconciliation. - fields.mdx: `readonly`'s "governed by their own guards" now names the resolved-affordance write policy and links to the bucket section. - authentication.mdx: note the better-auth identity objects are an identity-owned bucket — user-context generic CRUD is suppressed, better-auth's own writes run as system context. Docs only. Refs #3220 / ADR-0092 / ADR-0103. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fp9yZxRQ3mb7p4vVwqFXKE
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
os-zhuang
marked this pull request as ready for review
July 20, 2026 02:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs accuracy pass following #3220 / ADR-0103 (the taxonomy split, merged in #3315, plus the deny-list follow-up #3326). Hand-written docs only — the auto-generated
references/**already regenerated correctly from the zod schema.Gap
The canonical Object reference (
data-modeling/objects.mdx) documentedisSystembut never mentionedmanagedByat all — no property row, no bucket enumeration, no write-policy explanation. The engine-owned vs. admin-writable distinction ADR-0103 introduced was documented nowhere in hand-written prose (only in the ADR and the v16 release note).Changes
data-modeling/objects.mdx— addedmanagedBy+userActionsrows to the object property table, and a new "Lifecycle bucket (managedBy)" subsection: the five buckets as a table, the engine-owned vs. admin/user-writablesystemsplit with asys_user_preference-styleuserActionsexample, the resolved-affordance write policy (resolveCrudAffordances, not the bare bucket), theassertEngineOwnedWriteAllowedguard, and a callout on theapiMethodsreconciliation.data-modeling/fields.mdx—readonly's vague "governed by their own guards instead" now names the resolved-affordance write policy and links to the new bucket section (ADR-0103).permissions/authentication.mdx— noted the better-auth identity objects are an identity-owned bucket: user-context generic CRUD is suppressed (fail-closed guard), better-auth's own writes run under a system context.Scope notes
managedBy(package/platform/admin, ADR-0086/0094) — a different axis that shares the word..cn.mdxsiblings exist for the three edited pages, so no bilingual duplication needed.Check Changesetis red from a pre-existingmajorchangeset inherited from main —remove-session-tenantid-alias.md/ feat(hooks)!: remove deprecated ctx.session.tenantId alias — converge on organizationId (#3290) #3305 — unrelated to this PR, same as fix(security): derive better-auth managed-object write denies from the registry (#3325) #3326.)Verification
fumadocs-mdxcompiles the collection cleanly (exit 0); the#lifecycle-bucket-managedbyanchor links resolve.🤖 Generated with Claude Code
Generated by Claude Code